package com.net.oil.user.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.user.bean.OilApplyBusinessProductRecordDetailVO;
import com.net.oil.user.contract.MyReceiveGoodsDetailContract;
import com.net.oil.user.model.MyReceiveGoodsDetailModel;

/**
 * 作者：lch
 * 时间：2018/10/11 0011:下午 22:37
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class MyReceiveGoodsDetailPresenter extends BasePresenter<MyReceiveGoodsDetailContract.View> implements MyReceiveGoodsDetailContract.Presenter {

    private MyReceiveGoodsDetailContract.View view;
    private MyReceiveGoodsDetailContract.Model model;

    public MyReceiveGoodsDetailPresenter(MyReceiveGoodsDetailContract.View view) {
        this.view = view;
        model = new MyReceiveGoodsDetailModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getMyReceiveGoodsDetail(int id) {
        model.getMyReceiveGoodsDetail(id);
    }

    @Override
    public void getMyReceiveGoodsDetailSuccess(OilApplyBusinessProductRecordDetailVO myReceiveGoodsDetailBean) {
        view.getMyReceiveGoodsDetailSuccess(myReceiveGoodsDetailBean);
    }

    @Override
    public void getMyReceiveGoodsDetailFailed() {
        view.getMyReceiveGoodsDetailFailed();
    }
}
